Lecture L 16 — April 19 , 2012
ثبت نشده
چکیده
1 Overview In this lecture, we consider the string matching problem-finding some or all places in a text where the query string occurs as a substring. From the perspective of a one-shot approach, we can solve string matching in O(|T |) time, where |T | is the size of our text. This purely algorithmic approach has been studied extensively in the papers by Knuth-Morris-Pratt [6], Boyer-Moore [1], and Rabin-Karp [4]. However, we entertain the possibility that multiple queries will be made to the same text. This motivates the development of data structures that preprocess the text to allow for more efficient queries. We will show how to construct, use, and analyze these string data structures. Before we get to string matching we will solve an easier problem which is necessary to solve string matching. This is the predecessor problem among strings. Assume we have k strings, T 1 , T 2 , ..., T k and the query is: given some pattern P , we would like to know where P fits among the k strings in lexicographical order. More specifically we would like to know the predecessor of P among the k strings, according to the lexicographical order of the strings. Using our already developed data structures for this problem is not efficient as strings can be quite long and comparing strings is slow. So we need to use some other data structure that takes into account this fact. To solve the predecessor problem we will use a structure called a trie. A trie is a rooted tree where each child branch is labeled with letters in the alphabet Σ. We will consider any node v to store a string which represents the concatenation of all brach labels on the path from the root r to the v. More specifically given a path of increasing depth p = r, v 1 , v 2 , ..., v from the root r to a node v, the string stored at node v i is the concatenation of the string stored in v i−1 with the letter stored on the branch v i−1 v i. We will denote the strings stored in the leaves of the trie as words, and the strings stored in all other nodes as prefixes. The root r represents the empty string. We order the child branches of every node alphabetically from left to right. Note that …
منابع مشابه
L 16 — April 19 , 2012
In this lecture, we consider the string matching problem finding some or all places in a text where the query string occurs as a substring. From the perspective of a one-shot approach, we can solve string matching in O(|T |) time, where |T | is the size of our text. This purely algorithmic approach has been studied extensively in the papers by Knuth-Morris-Pratt [6], Boyer-Moore [1], and Rabin-...
متن کاملLecture Notes on Symmetric Spaces
1. Definition and Examples (p.2) 2. Transvections and Holonomy (p.7) 3. Killing Fields (p.9) 4. Cartan Involution and Cartan Decomposition (p.11) 5. Locally Symmetric Spaces (p.15) 6. Compact, Noncompact and Euclidean Type; Duality (p.16) 7. The Isometry Group (p.17) 8. Lie Subtriples and Totally Geodesic Subspaces (p.19) 9. Isotropy Representation and Rank (p.19) 10. The Weyl Group (p. 22) Ref...
متن کاملSecurity Protocols XVI - 16th International Workshop, Cambridge, UK, April 16-18, 2008. Revised Selected Papers
Why should wait for some days to get or receive the security protocols xvi 16th international workshop cambridge uk april 16 18 2008 revised selected papers lecture notes in computer science book that you order? Why should you take it if you can get the faster one? You can find the same book that you order right here. This is it the book that you can receive directly after purchasing. This secu...
متن کاملLarge deformation analysis of geomechanics problems by a combined rh-adaptive finite element method
Article history: Received 16 April 2012 Received in revised form 16 July 2012 Accepted 19 September 2012 Available online 17 December 2012
متن کاملJordan A . Taylor , Laura L . Hieber and Richard B . Ivry Feedback - dependent generalization
[PDF] [Full Text] [Abstract] , February 19, 2014; 34 (8): 3023-3032. J. Neurosci. Jordan A. Taylor, John W. Krakauer and Richard B. Ivry Explicit and Implicit Contributions to Learning in a Sensorimotor Adaptation Task [PDF] [Full Text] [Abstract] , April 16, 2014; 34 (16): 5564-5574. J. Neurosci. Lukas A. Hoffmann and Samuel J. Sober Vocal Generalization Depends on Gesture Identity and Seq...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2012